/* utility.h
 *
 * Copyright (C) 2006 John N. Laliberte
 *
 * This file is part of pam_grub.
 *
 * pam_grub is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * pam_grub is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with pam_grub; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef PAMGRUB_UTILITY_H
#define PAMGRUB_UTILITY_H 1

#include <stdio.h>
#include <string.h>
#include <glib-2.0/glib.h>

extern int
calculate_md5(char *, char *);

extern int
change_file_permissions_to_owner(gchar *);

extern int
change_file_owner_to_root(gchar *);

extern int
find_matching_line_in_file(gchar *, gchar *);

extern int
backup_file(gchar *, gchar **);

extern int
replace_line(gchar *, gchar **, gchar *, int);

extern int
write_file(gchar *, gchar *);

#endif /* PAMGRUB_UTILITY_H */
